home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
comm
/
cnet
/
revive.lha
/
ReVive
< prev
next >
Wrap
Text File
|
1995-09-30
|
9KB
|
158 lines
/**************************************************************************\
$VER: ReVive, v2.0 (29-Sep-95) by Dotoran!
\**************************************************************************/
options results;signal on SYNTAX;signal on ERROR;signal on IOERR;call IERROR
tr=transmit;se=sendstring;gc=getchar;gu=getuser;gs=getscratch;call RSDATA
a='rexxsupport.library';if ~show('l',a) then if ~addlib(a,0,-30) then exit
START:
gu 2400088;acts=result;gu 1202244;args=result-1
if args>0 then do;a=""
do i=0 to args-1;gu 1302307+(i*61);a=a||result" ";end i
tot=PARSE(a,1,acts);signal REVIVE2;end
call TITLE;se "n1c6Want Instructions? c7[cbNoc7]c9: ";gc;a=result
if a="Y" then do;tr "caYesc6!";signal DOCS;end;else tr "cbNoc6."
REVIVE:
se "n1cbReVive c6Which cbID c6Numberc7(c6sc7)c6? c7[caENTERc6=caScanc6/cdQc6=cdQuitc7]c9: cbi0 30}"
gu 70;a=result;if upper(a)="Q" then exit;else tot=PARSE(a,1,acts)
if tot=0 then do;se "n1c6Scanningc9: c7[cd0000c7]<5";tot=0;it.=""
do i=1 to acts;loadscratch i;st=result;savescratch (-i)
getscratch 1;handle=result;se "cd"right("cb"i,7,"0")"<4"
if handle="!" then do;tot=tot+1;it.tot=i;it.0=it.0" "it.tot;end
end i;tr ">6c9Finishedc6!"
if tot=0 then tr "n1c9No c9Deleted c6Accounts Found!"
else tr "n1c9Deleted cbID c6Numbersc9: cb"it.0
signal REVIVE;end
REVIVE2:
call open(f1,"SysData:ReViveDB","r")
do i=1 to tot;index=(it.i*38)-38
tr "f1caAttempting c6to cbReVive cfID # cc: ca"it.i
call seek(f1,index,"b")
uid=translate(strip(readch(f1,4),"t","00"x),reverse(bb),bb)
handle=translate(strip(readch(f1,20),"t","00"x),reverse(bb),bb)
password=translate(strip(readch(f1,14),"t","00"x),reverse(bb),bb)
if handle="!" then handle="REVIVE"it.i
if password="" then password="REVIVE"it.i
if uid="SID" then uid=it.i
loadscratch it.i;getscratch 1;handle2=result
getscratch 3;realname=result;getscratch 6;street=result
getscratch 4;citystate=result;getscratch 5;zipcode=result
getscratch 9;voice=result;getscratch 10;data=result
getscratch 11;lastcall=result;getscratch 39;maildir=result
getuser 1100000;year=result;getuser 1100001;month=result
getuser 1100002;day=result
if handle2~="!" then do
tr "n1c6This is c9NOT c6a cbdeleted c6account!n1"
tr "c6User's Handle c9: ca"handle2
tr "c6User's Real Name c9: cb"realname
tr "c6User's Password c9: cd"password
se "n1c7Press cdany key c7now...g1"
savescratch (-it.i);iterate i;end
tr "n1r1caData Found Inside Account r0cc:n1"
tr "c2 User's Real Name cc: c2"realname
tr "ca Street Address cc: ca"street
tr "c2 City, State Zip cc: c2"citystate" "zipcode
tr "ca Voice Phone Number cc: ca"voice
tr "c2 Data Phone Number cc: c2"data
tr "ca Last Call Date/Time cc: ca"lastcall
tr "n1r1cbData From ReVive Database r0cc:n1"
tr "cd Unique Serial Number cc: cd"uid
tr "c5 User's Handle cc: c5"handle
tr "cd User's Password cc: cd"password
se "n1 c6If the data from the cadatabase c6coincides with the existing "
se "data in the cbactual user accountc6, then it's caOK c6to cbReVive c6this "
se "account, but if the data in the account does c9NOT c6reflect the "
se "cfproper c6data for the c9DELETED c6user, then you should c9NOT c6attempt "
tr "to cbReVive c6this account.n1@4"
se "c6Should I cbReVive c6this account now? c7[cbNoc7]c9: ";gc;a=result
if a~="Y" then do;tr "cbNoc6.";savescratch (-it.i);iterate i;end
se "caYesc6, cbReVivingc6..."
address command "makedir mail:users/"maildir
setobject handle;putscratch 1
setobject password;putscratch 2
setobject uid;putscratch 41
setobject year;putscratch 1101094
setobject month;putscratch 1101095
setobject day;putscratch 1101096
savescratch it.i;tr "h6cbedc6!"
inuse=inuse+1;call SSDATA
if exists("mail:users2") then do
se "n1cbReVive ca"handle"'s ceUUCP Mail Directory c6too? c7[caYesc7]c9: "
gc;a=result;if a="N" then tr "cbNoc6.";else do;se "caYesc6, cbReVivingc6..."
address command "copy mail:users2/"maildir"/ mail:users/"maildir"/ all"
tr "h6cbedc6!";end;end
end i
call close(f1)
exit
PARSE: procedure expose it.; arg rng,min,max
it.='';c=0;it=translate(rng,' ','.,')
do a=1 to words(it);c=c+1;it.c=word(it,a)
if index(it.c,'-')>0 then do;parse var it.c x'-'y
if y='' then y=max;if x='' then x=min
if x>y then do;d=x;x=y;y=d;end
if x<min|y>max|~datatype(x,'W')|~datatype(y,'W') then do;c=c-1;iterate;end
do b=x to y;it.c=b;c=c+1;end;c=c-1;end
else if it.c<min|it.c>max|~datatype(it.c,'W') then do;c=c-1;iterate;end;end
do i=1 to c;it.0=it.0||it.i' ';end
return c
TITLE:;tr 'f1
└─┐';tr ' └┐ ┌─┐ ┌──┐C
█▀▀▀▄C█ █ ▄C▄▀▀▀▄C▄▀▀▀▄'
tr '
┌──┘ │ └───┘┌─┴┐C
█▄▄▄▀ ▄▀▀▄ █ █ ▄ █ █ ▄▀▀▄C▄▀C█ █'
tr '
└─┐ ┌┘
▄▄██
█
│
▄▄
└┐
█ █ █▀▀ █ █ █ ▀▄ ▄▀ █▀▀C▄▀▀C█ █'
tr '
│ │
██▀
└
▀██
┘
▀ ▀ ▀▀▀ ▀▀ ▀ ▀ ▀▀▀C▀▀▀▀▀ ▀ ▀▀▀'
tr '
┌┘┌┘
██C
██
█▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀▀
▀█'
tr '
│ │
▀██
▄▄
▄▄
██▀
█
Another
lifesaving utility
from
Dotoran
of
Frontiers
█'
tr ' └─┘C
▀▀
▀▀C
█▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄▄
▄█
'
return
DOCS:
tr "f1cbReVivec6, c7vcf2.0 cdDocumentation cf- c6Page cb1 c7(c6of cb2c7)n1"
se "c6 When a user account is c9deleted c6in caCNet Amiga, v3.05cc6, it's not "
tr "caactually c9deletedc6, but cbslightly changedc6.n1"
se " There are cdfour c6major pieces of information that are c9LOST c6during "
se "this processc9: caunique serial id numberc6, cbuser handlec6, cduser passwordc6, "
tr "and the ceuser's uucp mail directoryc6.n1"
se " cbReVivec6, c7vcf2.0 c6keeps a constantly updated cadatabase c6containing the "
se "first cathree c6pieces of information listed above, so that if you ever "
se "wish to cd`cbrevivecd' c6one of these c9deleted c6accounts, you'll have copies "
se "of the camost recent information c6from these accounts to recreate the "
se "user account with. A new ceuucp mail directory c6will also be created "
se "for this user, as well as their cdlast call date c6being updated to "
tr "reflect the cfcurrent datec6.n1"
se " Starting with this version, it is now possible to specify cfranges c6"
se "of id numbers you wish to cd`cbrevivecd'c6, so you may wish to initially hit "
se "your caENTER c6key to scan ceALL c6user accounts, then review each c9deleted c6"
tr "account to see if it should be cd`cbrevivedcd' c6or not.n1"
se "c7Press ccany key c7to continue...g1"
tr "f1cbReVivec6, c7vcf2.0 cdDocumentation cf- c6Page cb2 c7(c6of cb2c7)n1"
se "c6 Also starting with this version, the caneed to directly modify c6the "
se "values stored in the cd`cebbs.sdatacd' c6file is c9NOT c6needed. Because of "
se "this, it is cfno longer neccessary c6for you to reboot the computer "
tr "after reviving user accounts.n1"
se " If enabled, you may also be asked if you wish to cd`cbrevivecd' c6a "
se "user's ceuucp directory's cfCONTENTS c6from a backup as well. Presently, "
se "an cbexact duplicate c6of your cd`cbmail:users/cd' c6directory can be maintained "
se "in your cd`cemail:cd' c6directory which contains the camost up to date c6"
tr "contents of said directories.n1"
tr "c7Press ccany key c7to start cbReVivec7, vcf2.0c7...g1"
signal REVIVE
RSDATA: ; call open(f1,"SysData:bbs.sdata","r")
do i=1 to 5 ; vd.i=c2d(readch(f1,4)) ; end i
call close(f1) ; inuse=vd.2 ; return
SSDATA: ; vd.2=inuse ; setobject vd.2 ; putuser 2400092
call open(f2,"SysData:bbs.sdata","w")
do ii=1 to 5 ; call writech(f2,d2c(vd.ii,4)) ; end ii
call close(f2) ; return
SYNTAX:;ERROR:;IOERR:;e1=' Error: 'rc' ('errortext(rc)')'
e2=' Line: 'left(sigl,4)'File:';gu 1311992;a=result;gu 1311960;b=result;c='"'a||b'"';e2=e2' 'c;tr e1;tr e2;logentry e1;logentry e2
e=sourceline(sigl);do while e~='';e3='Source: 'left(e,37);tr e3;logentry e3;e=substr(e,38);end;bufferflush;exit
IERROR:;bb="`~!@#$%^&*()_-+=|\abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ[]{};':"d2c(34)",./<>?";return
/** Last Edited: 29-Sep-95 ************************************************\
\****************************************** Frontiers BBS (716)/823-9892 **/